package com.gupaowork.pattern.observer;

/**
 * @Author heweicheng
 * @Date 2020/10/4
 */
public class TeacherTest {
    public static void main(String[] args) {
        GPer gPer = GPer.getInstance();
        Question question = new Question();
        question.setContent("请问老师工作多少年了？");
        question.setName("tom");
        gPer.addObserver(new Teacher("MIC"));
        gPer.publishQuestion(question);

    }
}
